Disk drive write verifying unformatted data sectors

ABSTRACT

A disk drive is disclosed comprising a disk having a plurality of data sectors, wherein a physical block address (PBA) is associated with each data sector. When a write command is received from a host to write user data to the disk, and the write command comprises an unformatted logical block address (LBA), the user data is written to a first data sector, and the first data sector is write verified. A second data sector is defect scanned, and after the second data sector passes the defect scan, the user data is migrated from the first data sector to the second data sector and the LBA is formatted to the second data sector.

BACKGROUND

Disk drives comprise a disk and a head connected to a distal end of anactuator arm which is rotated about a pivot by a voice coil motor (VCM)to position the head radially over the disk. The disk typicallycomprises a number of concentric data tracks each partitioned into anumber of data sectors. Access operations are performed by seeking thehead to a target data track, and performing a write/read operation onthe data sectors within the data track. The disk typically comprisesembedded servo sectors having position information recorded therein,such as coarse position information (e.g., a track address) and fineposition information (e.g., servo bursts). A servo controller processesthe servo sectors to position the head over the target data track.

Each data sector is typically assigned a physical block address (PBA)which is accessed indirectly through a logical block address (LBA) tofacilitate mapping out defective data sectors. A PBA associated withdefective data sectors may simply remain unmapped if found duringmanufacturing, or if a data sector becomes defective while in-the-field(grown defect), the LBA may be remapped to the PBA of a spare datasector (and the data relocated to the spare data sector). The process ofinitially mapping the LBAs to PBAs and mapping out defective PBAs isreferred to as “formatting” the disk. The disk is formatted when thedisk drive is manufactured rather than when the disk drive isin-the-field. The prior art has suggested to perform in-the-field defectscanning to relocate defective data sectors to spare data sectors byremapping the LBA of the defective data sector to the PBA of the sparedata sector. However, mapping out grown defects in-the-field is stillperformed after the entire disk has been formatted (after the initialdefect scanning and mapping of the LBAs to PBAs during manufacturing).

Scanning for defective sectors during manufacturing of the disk drivetypically involves writing a special test pattern to each data sector(e.g., a 2T pattern) and reading the test pattern to identify defects.For example, a drop in the amplitude of the read signal may indicate adefect, or a defect filter matched to a defect signature may indicate adefect, or a number of bit errors exceeding a threshold may indicate adefect, etc. However, defect scanning every data sector in a disk driverepresents a significant bottleneck in the manufacturing process therebyincreasing the manufacturing cost.

SUMMARY OF EMBODIMENT OF THE INVENTION

A disk drive is disclosed comprising a disk having a plurality of datasectors, wherein a physical block address (PBA) is associated with eachdata sector. When a write command is received from a host to write userdata to the disk, and the write command comprises an unformatted logicalblock address (LBA), the user data is written to a first data sector,and the first data sector is write verified. A second data sector isdefect scanned, and after the second data sector passes the defect scan,the user data is migrated from the first data sector to the second datasector and the LBA is formatted to the second data sector.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A shows a disk drive according to an embodiment of the presentinvention comprising a disk, a head actuated over the disk, and controlcircuitry.

FIG. 1B is a flow diagram executed by the control circuitry according toan embodiment of the present invention wherein user data is written toan unformatted area of the disk, write verified, and eventually migratedto a formatted area of the disk.

FIG. 2 illustrates an embodiment of the present invention wherein afirst area of the disk is defect scanned and formatted duringmanufacturing, and the remainder of the disk is defect scanned andformatted while the disk drive is deployed in the field.

FIG. 3 shows a flow diagram according to an embodiment of the presentinvention wherein the user data is written to an alternative data sectorif a first unformatted data sector fails the write verify.

FIG. 4 is a flow diagram according to an embodiment of the presentinvention wherein unformatted data sectors are defect scanned, filledwith migrated user data, and formatted during an idle mode of the diskdrive.

FIG. 5 is a flow diagram according to an embodiment of the presentinvention wherein multiple data sectors are defect scanned prior toperforming the migration and formatting operation.

FIG. 6 is a flow diagram according to an embodiment of the presentinvention wherein if a read command is received to read data from anunformatted data sector, blank data is returned.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

FIG. 1A shows a disk drive comprising a disk 2 having a plurality ofdata sectors, wherein a physical block address (PBA) is associated witheach data sector. A head 4 is actuated over the disk 2, and controlcircuitry 6 executes the flow diagram of FIG. 1B to process writecommands received from a host. When a write command is received from thehost to write user data to the disk (step 8), and the write commandcomprises an unformatted logical block address (LBA) (step 10), the userdata is written to a first data sector (step 12), the first data sectoris write verified (step 14), a second data sector is defect scanned(step 16), after the second data sector passes the defect scan (step18), the user data is migrated from the first data sector to the seconddata sector (step 20), and the LBA is formatted to the second datasector (step 22).

In the embodiment of FIG. 1A, the disk 2 comprises a plurality ofembedded servo sectors 24 ₀-24 _(N) that define data tracks 26comprising the data sectors. The control circuitry 6 processes a readsignal 28 emanating from the head 4 to demodulate the embedded servosectors 24 ₀-24 _(N) and generate a position error signal (PES)representing a radial offset of the head 4 from a target track 26. Thecontrol circuitry 6 processes the PES with a suitable servo compensatorto generate a control signal 30 applied to a voice coil motor (VCM) 32.The VCM 32 rotates an actuator arm 34 about a pivot in order to actuatethe head 4 radially over the disk 2 in a direction that decreases thePES.

FIG. 2 shows a disk format according to an embodiment of the presentinvention wherein a number of data sectors in a first area of the disk 2are defect scanned and formatted during manufacturing of the disk driveprior to shipping. The first area of the disk may be used, for example,by a personal computer (PC) manufacturer to load an operating systemonto the disk drive. The remainder of the disk is defect scanned andformatted while the disk drive is deployed in the field. In theembodiment of FIG. 2, the data sectors are defect scanned from a firstdiameter of the disk (e.g., outer diameter) toward a second diameter ofthe disk (e.g., inner diameter). The user data of unformatted LBAs iswritten to data sectors starting at the second diameter of the disk(e.g., inner diameter) toward the first diameter (e.g., outer diameter)as shown in FIG. 2. In this manner, the defect scanned and formatteddata sectors “grow” toward the unformatted data sectors. In oneembodiment, the unformatted area of the disk for temporarily storing theuser data is maintained as a circular first-in first-out (FIFO) buffer.When the boundary of the unformatted data sectors approaches theboundary of the formatted data sectors (within a predeterminedthreshold), the head pointer of the circular buffer “wraps” around tothe beginning of the buffer near the second diameter (e.g., innerdiameter).

The formatted and unformatted data sectors may be located at anysuitable area of the disk. In one embodiment, the disk comprisesmultiple circular buffers disbursed at a suitable radial spacing forstoring the user data for unformatted LBAs. This embodiment may helpexpedite the migration process by reducing the seek length between theformatted and unformatted areas of the disk.

FIG. 3 shows a flow diagram according to an embodiment of the presentinvention which is an extension of the flow diagram of FIG. 1B, whereinif the first (unformatted) data sector fails the write verify (step 18),then the user data is written to an alternate data sector (step 36) andthe write verify is re-executed (step 14). This process continues untilan alternate data sector passes the write verify. The second data sectoris then defect scanned (step 38), and when the second data sector passesthe defect scan (step 40), the user data stored in the alternate datasector is migrated to the second data sector (step 42), and thecorresponding LBA for the user data is formatted to the second datasector (step 44).

FIG. 4 is a flow diagram according to an embodiment of the presentinvention wherein the control circuitry 6 receives access commands fromthe host (step 46) and processes the access commands (step 48). When thedisk drive enters an idle mode (step 50), for example, after apredetermined period of time that an access command has not beenreceived from the host, the control circuitry 6 enters a background taskwherein an unformatted data sector is defect scanned (step 52), and whenit passes the defect scan (step 54), the user data is migrated from oneof the temporary data sectors to the defect scanned data sector (step56). The LBA corresponding to the user data is then formatted to thedefect scanned data sector (step 58) such that when a subsequent accesscommand (read or write) is received from the host that identifies theLBA, the control circuitry 6 access the formatted data sector. This flowdiagram is then re-executed starting at step 52 to defect scan, migrate,and format a next data sector. In this manner, at least some of the datasectors can be defect scanned and formatted while the disk drive is inthe field, thereby reducing the manufacturing time of each disk drive.

In one embodiment (illustrated in FIG. 4), the background task fordefect scanning and formatting of data sectors is interruptable in orderto process a new access command received from the host (step 46). In oneembodiment, when the disk drive re-enters the idle mode, the backgroundtask starts over from step 52. Data is not “lost” even after themigration step (step 56) because the mapping from the temporary datasector does not change until the LBA is formatted (step 58). In anotherembodiment, the background task is re-started at the step where it wasinterrupted previously. In either embodiment, the step of formatting theLBA (step 58) is not interruptable to ensure that the formatting processfinishes once it begins so that data is not lost, for example, due to apower failure.

FIG. 5 is a flow diagram according to an embodiment of the presentinvention wherein the control circuitry 6 receives an access commandfrom the host (step 62). If the access command is a write command (step64), and the write command comprises a formatted LBA or LBAs (step 66),then the write command is executed normally by writing to the formatteddata sectors. If the write command comprises one or more unformattedLBAs (step 66), then the corresponding user data is written to anon-defect scanned, unformatted data sector (step 68). When the diskdrive enters the idle mode (step 70), an unformatted data sector isdefect scanned (step 74). If the unformatted data sector passes thedefect scan (step 74), then it is marked as defect scanned and availablefor formatting (step 76). If the unformatted data sector fails thedefect scan (step 74) then it is essentially discarded (slipped) so thatit is never formatted and never used. This process is repeated for anumber of data sectors (step 78), and then user data is migrated fromthe temporary unformatted data sectors to the defect scanned datasectors (step 80), and the corresponding LBAs are formatted to thedefect scanned data sectors (step 82).

In the embodiment of FIG. 5, if an access command received from the hostis a read command (step 64), then it is assumed that the LBAs identifiedin the read command are all formatted, and the read command is executednormally (step 84). In an alternative embodiment shown in the flowdiagram of FIG. 6, if an access command received from the host is a readcommand (step 64), the LBAs are evaluated to verify they are allformatted (step 86). If a data sector identified by the read command isunformatted, then the control circuitry 6 returns blank data to the host(step 88), wherein the blank data may comprise any suitable sequence,such as all zeros.

Any suitable control circuitry may be employed to implement the flowdiagrams in the embodiments of the present invention, such as anysuitable integrated circuit or circuits. For example, the controlcircuitry may be implemented within a read channel integrated circuit,or in a component separate from the read channel, such as a diskcontroller, or certain steps described above may be performed by a readchannel and others by a disk controller. In one embodiment, the readchannel and disk controller are implemented as separate integratedcircuits, and in an alternative embodiment they are fabricated into asingle integrated circuit or system on a chip (SOC). In addition, thecontrol circuitry may include a suitable preamp circuit implemented as aseparate integrated circuit, integrated into the read channel or diskcontroller circuit, or integrated into an SOC.

In one embodiment, the control circuitry comprises a microprocessorexecuting instructions, the instructions being operable to cause themicroprocessor to perform the steps of the flow diagrams describedherein. The instructions may be stored in any computer-readable medium.In one embodiment, they may be stored on a non-volatile semiconductormemory external to the microprocessor, or integrated with themicroprocessor in a SOC. In another embodiment, the instructions arestored on the disk and read into a volatile semiconductor memory whenthe disk drive is powered on. In yet another embodiment, the controlcircuitry comprises suitable logic circuitry, such as state machinecircuitry.

1. A disk drive comprising: a disk comprising a plurality of data sectors, wherein a physical block address (PBA) is associated with each data sector; a head actuated radially over the disk; and control circuitry operable to: receive a write command from a host to write user data to the disk, the write command comprising an unformatted logical block address (LBA); write the user data to a first data sector; write verify the first data sector; defect scan a second data sector; after the second data sector passes the defect scan, migrate the user data from the first data sector to the second data sector; and format the LBA to the second data sector.
 2. The disk drive as recited in claim 1, wherein the control circuitry is further operable to defect scan data sectors from a first diameter of the disk toward a second diameter of the disk.
 3. The disk drive as recited in claim 2, wherein the first data sector is located near the second diameter of the disk.
 4. The disk drive as recited in claim 1, wherein, if the write verify fails, the control circuitry is operable to: write the user data to a third data sector; write verify the third data sector; after the second data sector passes the defect scan, migrate the user data from the third data sector to the second data sector; and format the LBA to the second data sector.
 5. The disk drive as recited in claim 1, wherein the control circuitry is operable to defect scan the second data sector during an idle mode of the disk drive.
 6. The disk drive as recited in claim 1, wherein when the second data sector fails the defect scan, the control circuitry is further operable to: defect scan a fourth data sector; after the fourth data sector passes the defect scan, migrate the user data from the first data sector to the fourth data sector; and format the LBA to the fourth data sector.
 7. The disk drive as recited in claim 1, wherein the control circuitry is further operable to: receive a read command from a host to read data from the disk, the read command comprising an unformatted LBA; and return blank data to the host corresponding to the unformatted LBA.
 8. A method of operating a disk drive, the disk drive comprising a disk comprising a plurality of data sectors, wherein a physical block address (PBA) is associated with each data sector, and a head actuated radially over the disk, the method comprising: receiving a write command from a host to write user data to the disk, the write command comprising an unformatted logical block address (LBA); writing the user data to a first data sector; write verifying the first data sector; defect scanning a second data sector; after the second data sector passes the defect scan, migrating the user data from the first data sector to the second data sector; and formatting the LBA to the second data sector.
 9. The method as recited in claim 8, further comprising defect scanning data sectors from a first diameter of the disk toward a second diameter of the disk.
 10. The method as recited in claim 9, wherein the first data sector is located near the second diameter of the disk.
 11. The method as recited in claim 8, wherein, if the write verify fails, further comprising: writing the user data to a third data sector; write verifying the third data sector; after the second data sector passes the defect scan, migrating the user data from the third data sector to the second data sector; and formatting the LBA to the second data sector.
 12. The method as recited in claim 8, further comprising defect scanning the second data sector during an idle mode of the disk drive.
 13. The method as recited in claim 8, wherein when the second data sector fails the defect scan, further comprising: defect scanning a fourth data sector; after the fourth data sector passes the defect scan, migrating the user data from the first data sector to the fourth data sector; and formatting the LBA to the fourth data sector.
 14. The method as recited in claim 8, further comprising: receiving a read command from a host to read data from the disk, the read command comprising an unformatted LBA; and returning blank data to the host corresponding to the unformatted LBA. 